package com.clay.Proxy.DynamicAgent;

/**
 * @Author : clay
 * @Description:
 * @Date: Create in 7:51 2021/3/17
 * @Modified By:
 */
public class client {
    public static void main(String[] args) {
        TeacherDao teacherDao = new TeacherDao();
        ProxyFactory proxyFactory = new ProxyFactory(teacherDao);
        ITeacherDao proxyInstance = (ITeacherDao) proxyFactory.getProxyInstance();
        proxyInstance.teach();
        System.out.println(proxyInstance.getClass());

        proxyInstance.sayHello("Tom");
    }
}
